const webpack = require('webpack');
const cfg = require('./config');

module.exports = {
    entry: {
        main: cfg.src.web.entry,
        vendor: cfg.bin.lib.files
    },
    output: {
        path: cfg.bin.web.path,
        filename: cfg.bin.web.main
    },
    plugins: [
        new webpack.optimize.CommonsChunkPlugin({
            name: 'vendor',
            filename: cfg.bin.lib.main
        })
    ],
    module: {
        loaders: [{
            test: /\.js$/,
            loader: 'babel',
            exclude: /node_modules/,
            include: cfg.src.web.path
        }]
    }
};
